class Temperature:
    def __init__(self,degree):
        self.degree = degree
    def ToFahrenheit(degree):
        degree = float(degree)
        f = degree * 9/5 + 32
        return f
    def ToCelsius(degree2):
        degree2 = float(degree2)
        c = (degree2 - 32)*5/9
        return c
        

degree = float(input("请输入摄氏温度："))
print("摄氏温度 = {0:.1f}，华氏温度 = {1:.1f}".format(degree,Temperature.ToFahrenheit(degree)))
degree2 = float(input("请输入华氏温度："))
print("摄氏温度 = {0:.1f}，华氏温度 = {1:.1f}".format(Temperature.ToCelsius(degree2),degree2))

